Macos install cpu-only pytorch 2018-10-26 Macos without NVIDIA GPU, we need to use the CPU-only pytorch. Install pytorch 1conda install pytorch torchvision -c pytorch 1pip install torch torchvision Got RuntimeError: 12345RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU. modify your python code 12345torch.load(model_weights)||||vvtorch.load(model_weights, map_location=torch.device('cpu')) 赏 Thanks 微信 Mac Debug 扫一扫,分享到微信